<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="app"></div>
    <template id="t1">
      <div>
        <template v-for=" v in posts">
          <h2 :key="v.id+'a'">{{v.title}}</h2>
          <p :key="v.id+'b'">{{v.content}}</p>
        </template>
      </div>
    </template>
    <script src="./vue.js"></script>
    <script>
      const vm = new Vue({
        el: "#app",
        template: "#t1",
        data: {
          posts: [
            { id: 1, title: "title1", content: "content1" },
            { id: 2, title: "title2", content: "content2" },
            { id: 3, title: "title3", content: "content3" },
          ],
        },
      });
    </script>
  </body>
</html>
